﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace GuidGeneratorWPF
{
	/// <summary>
	/// Interaction logic for HelpToolTip.xaml
	/// </summary>
	public partial class HelpControl : UserControl
	{
		public HelpControl()
		{
			InitializeComponent();
		}

		public bool ShowTitleBar
		{
			get { return (bool)GetValue(ShowHeaderProperty); }
			set
			{
				SetValue(ShowHeaderProperty, value);
				this.TitleBar.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
			}
		}

		// Using a DependencyProperty as the backing store for ShowHeader.  This enables animation, styling, binding, etc...
		public static readonly DependencyProperty ShowHeaderProperty =
			 DependencyProperty.Register("ShowHeader", typeof(bool), typeof(HelpControl), new UIPropertyMetadata(true));

		private void UserControl_Loaded(object sender, RoutedEventArgs e)
		{
			if (App.Current == null)
				return;

			if (!App.Current.RegisteredCopyGuidHotKey)
			{
				this.listGuid.ListItems.Remove(this.listItemGuid);
			}

			if (!App.Current.RegisteredCopyMultipleGuidsHotKey)
			{
				this.list.ListItems.Remove(this.listItemGuids);
			}
		}
	}
}
